function DebugRenderer() {"use strict";
	// Initializes last update time
	this.prevTime = Date.now();

	// Stores canvas and context as static variables for indirection (browser independence) and performance
	var container = document.createElement('div');
	container.id = 'debugInfo';
	container.style.cssText = 'padding:0 0 3px 3px;text-align:left;background-color:#002;width:200px;';
	container.style.position = 'absolute';
	container.style.right = '0px';
	container.style.bottom = '0px';
	//
	this.l1 = document.createElement('div');
	this.l1.style.cssText = 'color:#0ff;font-family:Helvetica,Arial,sans-serif;font-size:9px;font-weight:bold;line-height:15px';
	this.l1.innerHTML = 'Updating: -. Rendering: - ms';
	container.appendChild(this.l1);
	//
	this.l2 = document.createElement('div');
	this.l2.style.cssText = 'color:#0ff;font-family:Helvetica,Arial,sans-serif;font-size:9px;font-weight:bold;line-height:15px';
	this.l2.innerHTML = 'Max FPS: -';
	container.appendChild(this.l2);
	//
	this.l3 = document.createElement('div');
	this.l3.style.cssText = 'color:#0ff;font-family:Helvetica,Arial,sans-serif;font-size:9px;font-weight:bold;line-height:15px';
	this.l3.innerHTML = 'Map: -';
	container.appendChild(this.l3);
	//
	this.l4 = document.createElement('div');
	this.l4.style.cssText = 'color:#0ff;font-family:Helvetica,Arial,sans-serif;font-size:9px;font-weight:bold;line-height:15px';
	this.l4.innerHTML = 'Cammera: -,-';
	container.appendChild(this.l4);
	//
	this.l5 = document.createElement('div');
	this.l5.style.cssText = 'color:#0ff;font-family:Helvetica,Arial,sans-serif;font-size:9px;font-weight:bold;line-height:15px';
	this.l5.innerHTML = '----';
	container.appendChild(this.l5);
	//
	this.l6 = document.createElement('div');
	this.l6.style.cssText = 'color:#0ff;font-family:Helvetica,Arial,sans-serif;font-size:9px;font-weight:bold;line-height:15px';
	this.l6.innerHTML = 'Objects: -';
	container.appendChild(this.l6);
	//
	this.l7 = document.createElement('div');
	this.l7.style.cssText = 'color:#0ff;font-family:Helvetica,Arial,sans-serif;font-size:9px;font-weight:bold;line-height:15px';
	this.l7.innerHTML = '----';
	container.appendChild(this.l7);
	//
	document.body.appendChild(container);
}

// Updates GUI
DebugRenderer.prototype.render = function() {
	"use strict";
	//
	var time = Date.now();
	if (time > this.prevTime + 300) {
		this.l1.innerHTML = 'Updating: ' + Game.updatingTime + '. Rendering: ' + Game.renderingTime + ' ms';
		//
		if (Game.updatingTime + Game.renderingTime !== 0) {
			this.l2.innerHTML = 'Max FPS: ' + Math.round(1000 / (Game.updatingTime + Game.renderingTime));
		} else {
			this.l2.innerHTML = 'Max FPS: +oo';
		}
		//
		this.l3.innerHTML = 'Map: ' + Game.model.map;
		//
		this.l4.innerHTML = 'Cammera: ' + Math.round(Game.gui.cammera.x) + ', ' + Math.round(Game.gui.cammera.y);
		//
		this.l5.innerHTML = '----';
		//
		this.l6.innerHTML = 'Objects: ' + Game.model.objectBag.objects.length;
		//
		this.l7.innerHTML = '----' ;
		//
		this.prevTime = time;
	}
};